<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title><?php echo C('GLOBAL-TITLE');?></title>

<link rel="stylesheet" type="text/css" href="<?php echo __CONTENT__;?>/css/layout.css" />
<link rel="stylesheet" type="text/css" href="<?php echo __CONTENT__;?>/css/global.css" />
<link rel="stylesheet" type="text/css" href="<?php echo __CONTENT__;?>/css/sp.css" />

<script type="text/javascript" src="<?php echo __CONTENT__;?>/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo __CONTENT__;?>/js/responsiveslides.min.js"></script>
<script type="text/javascript" src="<?php echo __CONTENT__;?>/js/script.js"></script>

<!--[if lt IE 9]>
<script src="<?php echo __CONTENT__;?>/js/html5.js" type="text/javascript"></script>
<![endif]-->

</head>
<body>
<div id="wrap">
<div id="headerwrap" class="clearfix">
<div id="header">
<div id="header_top" class="clearfix">
<h1><img src="<?php echo __CONTENT__;?>/images/logo.png" alt="k-two" width="126" height="30"></h1>

</div><!--/#header-top-->
<div id="gmenu">
<!-- <div class="gmenu-yoyaku clearfix">
<a href="http://61.119.173.223/reservation/cano/index.php" target="_blank">» 微信会员卡</a>
</div> -->
<ul>
<li><a href="<?php echo U('Index/index');?>">首页</a></li>
<li><a href="<?php echo U('Work/index');?>">作品展示</a></li>
<li><a href="<?php echo U('Page/index?key=storefront');?>">沙龙店面</a></li>
<li><a href="<?php echo U('Page/index?key=number');?>">会员办理 - 尊享4折优惠</a></li>
<li><a href="<?php echo U('News/index');?>">优惠活动</a></li>
<li><a href="<?php echo U('Product/index');?>">产品展示</a></li>
<li><a href="<?php echo U('Page/index?key=about');?>">关于我们</a></li>
<li><a href="<?php echo U('Page/appointment');?>">预约</a></li>
<li><a href="<?php echo U('Page/index?key=recruitment');?>">招聘</a></li>
</ul>
</div>

<button id="sp-menu-button" >了解英泰</button>
 <nav id="sp-menu" class="sp-menuwrapper">
    <div class="sp-title">了解英泰<span class="sp-menu-close">关闭</span></div>
    <ul class="sp-menu">
		<li><a href="<?php echo U('Page/index?key=about');?>">▶ 关于英泰 - 英泰发型私务所</a></li>
		<li><a href="<?php echo U('Page/index?key=idea');?>">▶ 英泰理念 - 健康 环保 时尚 摩登</a></li>
		<li><a href="<?php echo U('Page/update?key=storefront');?>">▶ 门店展示 - 我们的门店</a></li>
		<li><a href="<?php echo U('Page/update?key=team');?>">▶ 团队成员 - 我们的团队</a></li>
		<li><a href="<?php echo U('Page/appointment');?>">▶ 服务预约 - 预约发型师</a></li>
		<li><a href="/salons/shinsaibashi">▶ 门店地图 - 我们在这里</a></li>
        <li><a href="/salons/shinsaibashi">&nbsp;</a></li>
        <li><a href="/salons/shinsaibashi">&nbsp;</a></li>
        <li><a href="/salons/shinsaibashi">&nbsp;</a></li>
        <li><a href="/salons/shinsaibashi">&nbsp;</a></li>
	</ul>
</nav>
<?php if(is_weixin()){?>
<a href="<?php echo U('User/index');?>" class="sp-salon-yoyaku">▶ 会员卡</a>
<?php }?>

</div><!--/#header-->
</div><!--/#headerwrap-->
<link href="<?php echo __CONTENT__;?>/css/user.css" rel="stylesheet" />
 <h1 style="text-align:center;">推荐人:<?php echo $user['username'];?></h1>
<meta content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" name="viewport" />
<form id="quick-login-form" action="#" autocomplete="off" method="post" style="-webkit-transform-origin: 0px 0px 0px; opacity: 1; -webkit-transform: scale(1, 1);">
        <dl class="list list-in"><dd><dl>
            <dd class="kv-line-r dd-padding" data-com="smsBtn" data-requrl="/account/mobilelogincode">
                <input type="tel"  value="17785155145" name="phone" id="phone" class="input-weak kv-k" placeholder="请输入手机号">
                <button id="smsCode" type="button" class="btn btn-weak kv-v" gaevent="imt/buy/quickBuy/send">发送验证码</button>
            </dd>
            <dd class="dd-padding">
                <input class="input-weak J_input_sms" name="code" type="tel" pattern="[0-9]+" placeholder="请输入手机短信中的验证码" >
            </dd>
        </dl></dd></dl>
        <div class="btn-wrapper">
		<button type="submit" gaevent="imt/login/quick" class="btn btn-larger btn-block mj_login">注册</button>
        </div>
    </form>
     <h1 style="text-align:center;">注册成功后,您和推荐人都可获得10积分</h1>
     <p style="text-align:center;"><img src="<?php echo __CONTENT__;?>/images/safeqrcode.jpg" /></p>
     <p style="text-align:center;">关注微信号:宜昌英泰发型私务所</p>
<script>
var number;
var _countdown;
function countdown(){
	if(number==0){
		clearInterval(_countdown);
		$("#smsCode").html('发送验证码').removeAttr("disabled");
	}else{
		$("#smsCode").html(number);
		--number;
	}
}
$(function(){
	function is_phone(phone){
		if (phone.length!=11||!/^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/.test(phone)){
			return false;
		}
		return true;
	}
	$("#smsCode").click(function(){
		var phone=$("#phone").val();
		if(is_phone(phone)==false){
			alert('手机号码不正确');
			return false;
		}
		$.get("<?php echo U('sendSms');?>",{phone:phone},function(rs){
			if(rs.status!=1){
				alert(rs.msg);
			}else{
				number=120;
				_countdown=setInterval("countdown()",1000);
				$("#smsCode").attr("disabled","disabled");
				$("input[name='code']").val(rs.code);
			}
		},'json');
	});
	$(":submit").click(function(){
		$(this).attr("disabled",true);
		var phone=$.trim($("#phone").val());
		var code=$.trim($("input[name='code']").val());
		var uid="<?php if(isset($_GET['uid'])&&$_GET['uid']!=''){echo $_GET['uid'];}else{echo '0';}?>";
		if(is_phone(phone)==false){
			alert('手机号码不正确');
			return false;
		}
		if(code.length!=4){
			alert('效验码不正确');
			return false;
		}
		$.post("<?php echo U('login');?>",{phone:phone,code:code,uid:uid},function(rs){
			if(rs.status==1){
				alert('恭喜你,注册成功,您和推荐人都可获得10积分')
			}else{
			}
		},'json');
		return false;
	});
});
</script>
</div><!--/#wrap-->
</body>
</html>